package com.example.ByteStream;

import java.io.FileWriter;
import java.io.IOException;

/**
 * @author Jason
 * @PACKAGE_NAME com.example.ByteStream
 * @Description FileWriter输入流
 * @date 2023-12-11 23:05
 */
public class FileWriterDemo {
    public static void main(String[] args) throws IOException {
        //1.创建FileWriter写入流
        FileWriter fr = new FileWriter("d:\\abc.txt");
        //2.写入
        for (int i = 0; i < 10; i++) {
            fr.write("java最好学了");
        }
        //3.关闭
        fr.close();
        System.out.println("执行完毕");
    }
}
